{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "33efd583-eb4d-41d0-913e-160e785e056c",
   "metadata": {},
   "source": [
    "# 安装模块\n",
    "`pip install pillow opencv-python`"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "11d09535-fe73-4cd9-9e37-5ffca0039224",
   "metadata": {},
   "source": [
    "# 图片缩放：converted.py\n",
    "## 可以设置默认宽度：max_width\n",
    "`def resize_image(input_path, output_path, max_width=1000):`"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f8f19ef3-ef73-4d8b-96d2-e3add3f42e6c",
   "metadata": {},
   "source": [
    "# 图片裁剪：crop_images_in_directory.py\n",
    "## 控制裁剪框的左右上下坐标\n",
    "\n",
    "`crop_box = (60, 60, 820, 1100)  # 裁剪框 (left, top, right, bottom)`"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "064483a2-e819-4c8a-8cde-a5414f352af6",
   "metadata": {},
   "source": [
    "# 图片显示：ImageViewer.py\n",
    "## 可选模块：软件打包\n",
    "`pip install pyinstaller`\n",
    "\n",
    "`pyinstaller --onefile --windowed ImageViewer.py`\n",
    "### 报错“PIL._tkinter_finder”：\n",
    "`pyinstaller --onefile --windowed --hidden-import PIL._tkinter_finder ImageViewer.py`\n",
    "## 使用说明\n",
    "1. 点击“浏览...”可以选择目录。\n",
    "2. 点击“加载图片”显示目录中的图片。\n",
    "3. 图片显示右侧和下方有图片上下、左右移动的滚动条。\n",
    "4. 图片下拉框可以选择图片名称进行显示。\n",
    "5. 功能：“上一张”、“下一张”、“放大（+）”、“缩小（-）”、“重置缩放”\n",
    "6. “保存列表”：保存目录、图片列表和当前浏览的图片序号到json文件\n",
    "7. “加载列表”：加载保存的json文件，恢复目录、图片列表和当前浏览的图片序号"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8fe8f58c-f9d3-4b0c-97e5-4e9019dd28b0",
   "metadata": {},
   "source": [
    "# 视频播放器：VideoPlayer.py\n",
    "## 主要界面功能\n",
    "### 打开视频\n",
    "可以通过浏览方式打开视频文件。\n",
    "### 后退5秒、播放|暂停、前进5秒、截图和视频视频尺寸控制。\n",
    "## 提示\n",
    "- 视频暂停时，通过下方滚动条，可以直接从特点位置进行播放。\n",
    "- 截图功能不依赖暂停，可以在播放条件下进行。"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
